//
//  MBBaseViewController.m
//  MobellCloud_ios
//
//  Created by cherry pu on 2017/12/21.
//  Copyright © 2017年 zhangXin. All rights reserved.
//

#import "MBBaseViewController.h"

@interface MBBaseViewController ()<UINavigationControllerDelegate>

@end

@implementation MBBaseViewController

- (instancetype)initWithViewModel:(MBBaseViewModel *)viewModel
{
    self = [super init];
    if (self) {
        _viewModel = viewModel;
    }
    return self;
}


- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.view.backgroundColor = COLOR_BG;
    self.navigationController.delegate = self;
}

- (void)setupLayout
{
    MBBaseNaviView* naviView = [[MBBaseNaviView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 44+SCREEN_STATUS_BAR_HEIGHT)];
    self.naviView = naviView;
    [self.view addSubview:naviView];
    
}

-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [navigationController setNavigationBarHidden:YES animated:YES];
}

@end
